<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>


        //转化为Boolean 类型    '' 0  null  undefined   NaN  会转化为false
        //其余的都是  true

        console.log(Boolean(''));
        console.log(Boolean(0));
        console.log(Boolean(null));
        console.log(Boolean(undefined));
        console.log(Boolean(NaN));
        console.log(Boolean('鲁大师'-100));   //里面时NaN


        console.log(Boolean('卡机'))   //true
        console.log(Boolean('123'))    //true
        console.log(Boolean(123))    //true


        if(5){
            alert(111)
        }


        var arr=[1,3]
        if(arr[1]){
            alert(2222)
        }

    </script>
</head>
<body>

</body>
</html>